package com.wn.mapper;

import com.wn.common.pojo.Appointment;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AppointmentMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Appointment record);

    int insertSelective(Appointment record);

    Appointment selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Appointment record);

    int updateByPrimaryKey(Appointment record);

    List<Appointment> selectByCondition(Appointment record);
    //根据订单编号查询预约订单
    Appointment getByOrderNumber(@Param("orderNumber") Integer orderNumber);
    //根据userid拿到该用户的所有预约订单
    List<Appointment> selectAllAppointmentByUserId(@Param("userId") Integer userId);
    //通过订单编号改变预定订单的状态至待支付
    int updateStatusToPay(@Param("orderNumber") Integer orderNumber,@Param("resPrice") String resPrice);
    //改变预约单状态至等待旅行团通知（已付款）
    int changeStatusToPayOffByOrderNumber(@Param("orderNumber") Integer orderPaynumber);
    //查询预约单信息
    Appointment selectByOrderNumber(@Param("orderPaynumber") int orderPaynumber);

//    //高级检索的方法
//    public List<Appointment> superSearch(String superSearchKeyWord);
//
//    //查询所有的方法
//    List<Appointment> queryAll();

}
